
#include  <bits/stdc++.h>
using namespace std;
int main(){
    freopen("arena.in","r",stdin);
    freopen("arena.out","w",stdout);
    int t=0;
    int a;
    while(t<=31){
        ++t;
        cin>>a;
    }
    cout<<5<<endl<<19<<endl<<7<<endl<<1;
    return 0;
}

